﻿#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

#endregion

namespace xConnected.Core.Model
{
    [Serializable]
    [DataContract]
    [DisplayColumn("Title")]
    public class Position : PersistentEntity
    {
        public Position()
        {
            Categories = new List<Category>();
            Technologies = new List<Technology>();
            MessageUsers = new List<MessagePositionUser>();
        }

        [DataMember]
        public bool IsDefault { get; set; }

        [DataMember]
        public bool IsAuthenticated { get; set; }

        [DataMember]
        public string Title { get; set; }

        [DataMember]
        public string Description { get; set; }

        [DataMember]
        public DateTime? StartDate { get; set; }

        [DataMember]
        public string Duration { get; set; }

        [DataMember]
        public string Location { get; set; }

        [DataMember]
        public double XLocation { get; set; }

        [DataMember]
        public double YLocation { get; set; }
        
        [DataMember]
        public string Photo { get; set; }

        [DataMember]
        public short JobType { get; set; }

        [DataMember]
        public string ContractTypeText { get; set; }

        [DataMember]
        public int CompanyProfileId { get; set; }

        [DataMember]
        public virtual CompanyProfile CompanyProfile { get; set; }

        [DataMember]
        public virtual int IndustryId { get; set; }

        [DataMember]
        public virtual Industry Industry { get; set; }

        [DataMember]
        public virtual int CountryId { get; set; }

        [DataMember]
        public virtual Country Country { get; set; }

        [DataMember]
        public virtual IList<Category> Categories { get; set; }

        [DataMember]
        public virtual IList<Technology> Technologies { get; set; }

        [DataMember]
        public virtual IList<MessagePositionUser> MessageUsers { get; set; }

        [DataMember]
        public virtual IList<PositionList> PositionLists { get; set; }
    }
}